using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Security.Permissions;

namespace CodeStory.Core
{
	/// <summary>
	/// This attribute indicate the 'Portlet' class can be used as url part to navigate the page, and also this 'Portlet'
	/// object can only be added to one page.
	/// <remarks>
	/// If you set the NavigationName property to "xxx" for this attribute, then
	/// you can use "~/xxx.portlet.aspx" as the url to navigate the page which contains
	/// this 'portlet'.
	/// </remarks>
	/// </summary>
	[AttributeUsage(AttributeTargets.Class,AllowMultiple = false, Inherited = true)]
	[AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
	public class NavigationPortletAttribute : Attribute
	{
		private string navigationName = string.Empty;
		/// <summary>
		/// 
		/// </summary>
		public string NavigationName {
			get { return navigationName; }
			set { navigationName = value; }
		}
		/// <summary>
		/// The constructor for the NavigationPortletAttribute.
		/// </summary>
		/// <param name="navigationName"></param>
		public NavigationPortletAttribute(string navigationName) {
			this.navigationName = navigationName;
		}
	}
}
